package cn.tedu.hospital.management.dao.persist.repository;

import cn.tedu.hospital.management.pojo.entity.*;
import cn.tedu.hospital.management.pojo.param.HospitalParam;
import cn.tedu.hospital.management.pojo.vo.HospitalHospitalVO;
import cn.tedu.hospital.management.pojo.vo.HospitalStandardVO;
import cn.tedu.hospital.management.pojo.vo.HospitalVO;

import java.util.List;

public interface IHospitalRepository {

   int insert(Hospital hospital);

   Long hospitalIdByName(String hospitalName);
   Long cityIdByName(String cityName);
   Long levelIdByName(String levelName);
   Long provinceIdByName(String provinceName);
   Long typeIdByName(String typeName);

   int insert(Field field);


   void delectById(Long id);

   int updateCityIdBy(City city);
   int updateHospitalIdBy(Hospital hospital);
   int updateLevelIdBy(Level level);
   int updateProvinceIdBy(Province province);
   int updateTypeIdBy(Type type);

    List<HospitalHospitalVO> selectAll();

    /*插入数据到医院表*/
    int insertHospital(Hospital hospital);

    /*查询城市id*/
    Long selectHospitalCityId(String name);

    /*查询等级id*/
    Long selectHospitalLevelId(String name);

    /*查询省份id*/
    Long selectHospitalProvinceId(String name);

    /*查询类型id*/
    Long selectHospitalTypeId(String name);

    /*根据id删除医院*/
    int deleteById(Long id);

    /*根据id修改医院信息*/
    int updateById(Hospital hospital);

    /*根据id查询医院详情*/
    HospitalStandardVO getStandardById(Long id);

    List<HospitalVO> getHospitals(HospitalParam hospitalParam);

    int avatar(Hospital hospital);

}
